package com.lpf.lambda.demo;

import org.junit.Test;

public class Lambda_Use {

	// 需求：对一个数进行运算
	@Test
	public void test99() {
		Integer num = operation(100, (x) -> x * x);
		System.out.println(num);
		System.out.println(operation(200, (y) -> y + 200));
	}

	public Integer operation(Integer num, MyFun mf) {
		return mf.getValue(num);
	}
}
